package com.chaber.containers.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.chaber.containers.beans.ProductCategoryData;
import com.chaber.containers.daos.ProductCategoryDAO;

public class ProductCategoryService extends AbstractService {

	@Autowired
	private ProductCategoryDAO productCategoryDAO;
	
	public List<ProductCategoryData> findAll() {
		List<ProductCategoryData> result = this.productCategoryDAO.findAll();
		return result;
	}
	
	public void save(ProductCategoryData productCategoryData) {
		this.productCategoryDAO.save(productCategoryData);
	}
	
	public void remove(Integer id) {
		this.productCategoryDAO.delete(id);
	}
	
	public ProductCategoryData getProductCategory(Integer id) {
		ProductCategoryData result = this.productCategoryDAO.findOne(id);
		return result;
	}
}
